<?

$header = new SectionTemplate;
$header->file = "header.php";

$footer = new SectionTemplate;
$footer->file = "footer.php";

include_class('links');

$lc = LinkCategory::getActiveList();

$categories = array();

foreach ($lc as $c) {
	$ll = Link::getActiveList($c->getID());

	$categoryT = new SectionTemplate;
	$categoryT->file = "link_category.php";
	$categoryT->args['category'] = $c;

	$links = array();

	foreach ($ll as $l) {
		$linkT = new SectionTemplate;
		$linkT->file = "link_detail.php";
		$linkT->args['link'] = $l;
		$links[] = $linkT;
	}

	$categoryT->args['links'] = $links; 
	$categories[] = $categoryT;
}

?>
